var form;

$(document).ready(function () {
    layui.use('form', function () {
        form = layui.form;
        form.render();

    });
});

function addCategory() {

    var formJSON = $("#category-submit-form").serializeObject();

    // 添加住户
    ajax(
        "/admin/category/addCategory", "POST",
        formJSON, true, true, true
    ).done(function () {
        loadingPage("/admin/category/category");;
    });

}